{extend name="pc/common/_base" /}

{block name="title"}
<title>mp3音频转换提取文字-在线音频提取文字免费试用-语音转文字平台-音频转换器在线-{$website['title']}</title>
{/block}

{block name="keywords"}
<meta name="keywords" content="音频转文字,音频转文字软件,在线音频提取文字免费试用,mp3音频转文字,mp3音频文字提取软件,语音转文字平台,{$website['title']}">
{/block}

{block name="description"}
<meta name="description" content="{$website['title']}音频转换器提供音频转（提取）文字功能,只需导入音频文件,即可快速准确地将音频文件内含有的语音信息进行识别（提取）并导出为文本文档,轻松完成音频转文字操作.">
{/block}

{block name="style"}
<style>
    #cbresultbox {
        width: 100%;
        margin: 30px auto;
    }

    .cbresultlt, .cbresultrt {
        height: 300px;
        background-color: #fff;
        overflow: hidden;
        margin-bottom: 5px;
        float: left;
        -webkit-box-shadow: 0 1px 3px #d5d6d9;
        border-radius: 3px;
    }

    .cbresultlt {
        margin-right: 6px;
    }

    .cbresultlt, .cbresultrt {
        width: 594px;
    }

    .cbresultlt .cbtitle, .cbresultrt .cbtitle {
        height: 60px;
        border-bottom: 1px solid #eaeaea;
    }

    .cbresultrt .cbtitle {

    }

    .cbresultrt .cbtitle .iconfont {
        float: right;
        cursor: pointer;
        font-size: 16px;
    }

    .cbresultlt .cbtitle p, .cbresultrt .cbtitle p {
        float: left;
        color: #565656;
        border: 1px solid #a0edd7;
        background-color: #e2faf3;
        width: 62px;
        height: 30px;
        line-height: 26px;
        text-align: center;
        border-radius: 15px;
        margin-top: 15px;
        font-size: 13px;
        margin-left: 21px;
    }

    .cbresultlt .cbtitle p {
        width: 96px;
    }

    #cbresultbox .cbtrl {
        float: right;
        margin-top: 15px;
        margin-right: 20px;
    }

    #cbresultbox .cbtrl button {
        width: 68px;
        height: 30px;
        line-height: 30px;
        background-color: #00b0fe;
        color: #fff;
        text-align: center;
        border-radius: 15px;
        margin-left: 10px;
        cursor: pointer;
        outline: none;
        border: none;
    }

    .cbresultlt .cbbody textarea, .cbresultrt .cbbody textarea {
        width: 96%;
        height: 180px;
        border: none;
        outline: none;
        color: #777;
        resize: none;
        padding: 10px 12px;
        transition: all 0.3s;
        -webkit-transition: all 0.3s;
    }

    .more-row {
        float: left;
        cursor: pointer;
    }

    .more-row .checkbox {
        line-height: 30px;
        margin-top: 0;
    }

    .more-row .more-name {
        height: 30px;
        line-height: 30px;
        margin-left: 4px;
        margin-right: 4px;
    }
</style>
{/block}

{block name="main"}

<div class="editer">

    <div class="container">

        <h1 class="editer-title">BASE64</h1>
        <p class="editer-info">在线BASE64编码/解码</p>

        <div id="cbresultbox" class="clearfix flex">
            <div class="cbresultlt">
                <div class="cbtitle">
                    <p>base64编码</p>
                    <div class="cbtrl">
                        <div class="more-row flex-center" @click="selectCheckbox()">
                            <input type="checkbox" name="chk" class="checkbox" v-model="isChecked">
                            <span class="more-name">&nbsp;多行</span>
                        </div>
                        <button @click="btnEncode()">编码</button>
                        <button @click="btnDecode()">解码</button>
                    </div>
                </div>
                <div class="cbbody">
                    <textarea v-model="content"></textarea>
                </div>
            </div>
            <div class="cbresultrt">
                <div class="cbtitle flex-row-end">
                    <div class="copyback"><i class="iconfont icon-fuzhi"></i></div>
                    <span class="iconfont icon-shanchu" style="margin-left: 20px;margin-right: 20px;font-size: 20px;"></span>
                </div>
                <div class="cbbody">
                    <textarea v-model="resContent"></textarea>
                </div>
            </div>
        </div>

        <div class="recommend-box" style="margin-top: 60px">
            {include file='pc/common/app'}
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>

    // $("#conv").click(function() {
    //     $("#result").val($("#content").val().replace(/[^\u0000-\u00FF]/g, function($0) {
    //         return escape($0).replace(/(%u)(\w{4})/gi, "&#x$2;")
    //     }));
    //     if ($("#result").val())
    //         $("#result").siblings().hide();
    // });
    // $("#res").click(function() {
    //     $("#content").val(unescape($("#result").val().replace(/&#x/g, '%u').replace(/;/g, '')));
    //     if ($("#content").val())
    //         $("#content").siblings().hide();
    // });

    require(['vue'], (Vue) => {
        new Vue({
            el: '#cbresultbox',
            data: {
                content: '',
                resContent: '',
                isChecked: false,
            },
            methods: {
                selectCheckbox() {
                    this.isChecked = !this.isChecked;
                },
                btnEncode() {
                    let content = this.content;
                    // let resContent = content.replace(/[^\u0000-\u00FF]/g, ($0) => {
                    //     return escape($0).replace(/(%u)(\w{4})/gi, "&#x$2;")
                    // });
                    // console.log(resContent);
                    // this.resContent = resContent;
                },
                btnDecode() {
                    let resContent = this.resContent;
                    // let content = unescape(resContent.replace(/&#x/g, '%u').replace(/;/g, ''));
                    // console.log(content);
                    // this.content = content;
                }
            }
        });
    });

</script>
{/block}